From: Matthias Clasen Date: Thu, 30 Aug 2018 20:38:03 +0000 (-0400) Subject: GtkApplication: Respect GTK_USE_PORTAL X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~32^2~20 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=3fc319ff1be391430f23701673253e1c0994a0cc;p=gtk%2B3.0.git GtkApplication: Respect GTK_USE_PORTAL When the environment variable is set, don't connect to the session manager, but instead rely on the inhibit portal. --- diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c index 0b052757b5..57ed678cba 100644 --- a/gtk/gtkapplication-dbus.c +++ b/gtk/gtkapplication-dbus.c @@ -24,6 +24,7 @@ #include "gtkapplicationprivate.h" #include "gtksettings.h" +#include "gtkprivate.h" G_DEFINE_TYPE (GtkApplicationImplDBus, gtk_application_impl_dbus, GTK_TYPE_APPLICATION_IMPL) @@ -195,6 +196,9 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl, dbus->object_path = g_application_get_dbus_object_path (G_APPLICATION (impl->application)); dbus->unique_name = g_dbus_connection_get_unique_name (dbus->session); + if (gtk_should_use_portal ()) + goto out; + g_debug ("Connecting to session manager"); /* Try the GNOME session manager first */